home *** CD-ROM | disk | FTP | other *** search
/ Adobe Digital Video Collection / Digital Video Collection CD.iso / After Effects 5.5 / MMScriptEng.Cab / F115573_blink.mm next >
Encoding:
Text File  |  2001-12-07  |  967 b   |  25 lines

  1. // Blink - Version 1.1
  2.  
  3. // This script varies opacity based on a cosine function.
  4. // The three variables below control the blinking rate & opacity range.
  5. // To use, select the layer whose opacity you wish to change in layer popup 1
  6.  
  7. //      LAYER                                               PROPERTY                     CHANNEL
  8. //      ------                                              ----------                     --------
  9. // 1: Layer whose opacity to vary             doesn't matter                doesn't matter
  10. // 2: doesn't matter                                  doesn't matter                doesn't matter
  11.  
  12. blink_speed = 1;    // blinks per second
  13.  
  14. low_opacity = 10.0;    // low opacity value
  15.  
  16. high_opacity = 90.0;    // high opacity value
  17.  
  18. opacity_range = high_opacity - low_opacity;
  19.  
  20. pi = 3.141592654;
  21.  
  22. op_normal = (cos(blink_speed * time() * pi * 2) + 1) / 2;
  23.  
  24. value(pop_layer(1), opacity) = (op_normal * opacity_range) + low_opacity;
  25.